home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1988 November
/
Ahoy_Magazine_88-11_1988_Double_L.d64
/
Birthday Party
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
601b
|
21 lines
0 print"[147]"tab(13)"birthday party"
1 rem ==================================
2 rem commodares problem #54-4 :
3 rem birthday party
4 rem solution by
5 rem jim speers
6 rem ==================================
100 fora=0to1:forb=0to1:forc=0to1:ford=0to1:fore=0to1
110 if((b=1)and(c=1))or((b=0)and(c=0))then220:rem premise #1
120 if((a=1)and(b=0))then220:rem premise #2
130 if((d=0)and(e=0))then220:rem premise #3
140 if((d=1)and(c=0))or((c=1)and(d=0))then220:rem premise #4
150 if((e=1)and((a=0)or(d=0)))then220:rem premise #5
160 ifathenprint"adam, ";
170 ifbthenprint"bert, ";
180 ifcthenprint"carl, ";
190 ifdthenprint"duke, ";
200 ifethenprint"emil, ";
210 printchr$(20)chr$(20)"."
220 nexte,d,c,b,a